package com.caocaog.market.merchant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caocaog.market.merchant.entity.MkMerchantBasic;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * @author liguang
 * @version 1.0.0
 * @Project jeecg-boot
 * @Package com.caocaog.market.data.transfer.mapper.xml
 * @ClassName MkMerchantMapper.java
 * @createTime 2021年11月16日 09:40:00
 * @Description TODO
 */
public interface MkMerchantMapper extends BaseMapper<MkMerchantBasic> {
    int  insertMkMerchant(MkMerchantBasic mkMerchantBasic);

    IPage<MkMerchantBasic> findMerchantList(Page<MkMerchantBasic> page, MkMerchantBasic mkMerchantBasic);


    /**
     * 商家提交认证信息成功后，修改该商家用户的用户名（realname）
     *                          ——liguang
     * */
    @Update("update sys_user set realname=#{realName} where id=#{userId}")
    int updateRealnameByUserId(String userId,String realName);

    List<MkMerchantBasic> findMerchantList(@Param("mkMerchantBasic") MkMerchantBasic mkMerchantBasic);

}
